home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / appcomps / nsIAppStartup.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-08  |  6.0 KB  |  200 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIAppStartup.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIAppStartup_h__
  6. #define __gen_nsIAppStartup_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsICmdLineService; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIAppStartup */
  21. #define NS_IAPPSTARTUP_IID_STR "e9b0f89b-0529-4d96-98a8-eb5b2b9a8383"
  22.  
  23. #define NS_IAPPSTARTUP_IID \
  24.   {0xe9b0f89b, 0x0529, 0x4d96, \
  25.     { 0x98, 0xa8, 0xeb, 0x5b, 0x2b, 0x9a, 0x83, 0x83 }}
  26.  
  27. class NS_NO_VTABLE nsIAppStartup : public nsISupports {
  28.  public: 
  29.  
  30.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAPPSTARTUP_IID)
  31.  
  32.   /**
  33.      * Create the hidden window.
  34.      */
  35.   /* void createHiddenWindow (); */
  36.   NS_IMETHOD CreateHiddenWindow(void) = 0;
  37.  
  38.   /**
  39.      * Runs an application event loop: normally the main event pump which
  40.      * defines the lifetime of the application.
  41.      *
  42.      * @returnCode NS_SUCCESS_RESTART_APP
  43.      *             This return code indicates that the application should be
  44.      *             restarted because quit was called with the eRestart flag.
  45.      */
  46.   /* void run (); */
  47.   NS_IMETHOD Run(void) = 0;
  48.  
  49.   /**
  50.      * During application startup (and at other times!) we may temporarily
  51.      * encounter a situation where all application windows will be closed
  52.      * but we don't want to take this as a signal to quit the app. Bracket
  53.      * the code where the last window could close with these.
  54.      * (And at application startup, on platforms that don't normally quit
  55.      * when the last window has closed, call Enter once, but not Exit)
  56.      */
  57.   /* void enterLastWindowClosingSurvivalArea (); */
  58.   NS_IMETHOD EnterLastWindowClosingSurvivalArea(void) = 0;
  59.  
  60.   /* void exitLastWindowClosingSurvivalArea (); */
  61.   NS_IMETHOD ExitLastWindowClosingSurvivalArea(void) = 0;
  62.  
  63.   /**
  64.      * The following flags may be passed as the aMode parameter to the quit
  65.      * method.  One and only one of the "Quit" flags must be specified.  The
  66.      * eRestart flag may be bit-wise combined with one of the "Quit" flags to
  67.      * cause the application to restart after it quits.
  68.      */
  69. /**
  70.      * Attempt to quit if all windows are closed.
  71.      */
  72.   enum { eConsiderQuit = 1U };
  73.  
  74.   /**
  75.      * Try to close all windows, then quit if successful.
  76.      */
  77.   enum { eAttemptQuit = 2U };
  78.  
  79.   /**
  80.      * Quit, damnit!
  81.      */
  82.   enum { eForceQuit = 3U };
  83.  
  84.   /**
  85.      * Restart the application after quitting.  The application will be
  86.      * restarted with the same profile and an empty command line.
  87.      */
  88.   enum { eRestart = 16U };
  89.  
  90.   /**
  91.      * Exit the event loop, and shut down the app.
  92.      *
  93.      * @param aMode
  94.      *        This parameter modifies how the app is shutdown, and it is
  95.      *        constructed from the constants defined above.
  96.      */
  97.   /* void quit (in PRUint32 aMode); */
  98.   NS_IMETHOD Quit(PRUint32 aMode) = 0;
  99.  
  100. };
  101.  
  102. /* Use this macro when declaring classes that implement this interface. */
  103. #define NS_DECL_NSIAPPSTARTUP \
  104.   NS_IMETHOD CreateHiddenWindow(void); \
  105.   NS_IMETHOD Run(void); \
  106.   NS_IMETHOD EnterLastWindowClosingSurvivalArea(void); \
  107.   NS_IMETHOD ExitLastWindowClosingSurvivalArea(void); \
  108.   NS_IMETHOD Quit(PRUint32 aMode); 
  109.  
  110. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  111. #define NS_FORWARD_NSIAPPSTARTUP(_to) \
  112.   NS_IMETHOD CreateHiddenWindow(void) { return _to CreateHiddenWindow(); } \
  113.   NS_IMETHOD Run(void) { return _to Run(); } \
  114.   NS_IMETHOD EnterLastWindowClosingSurvivalArea(void) { return _to EnterLastWindowClosingSurvivalArea(); } \
  115.   NS_IMETHOD ExitLastWindowClosingSurvivalArea(void) { return _to ExitLastWindowClosingSurvivalArea(); } \
  116.   NS_IMETHOD Quit(PRUint32 aMode) { return _to Quit(aMode); } 
  117.  
  118. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  119. #define NS_FORWARD_SAFE_NSIAPPSTARTUP(_to) \
  120.   NS_IMETHOD CreateHiddenWindow(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateHiddenWindow(); } \
  121.   NS_IMETHOD Run(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(); } \
  122.   NS_IMETHOD EnterLastWindowClosingSurvivalArea(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnterLastWindowClosingSurvivalArea(); } \
  123.   NS_IMETHOD ExitLastWindowClosingSurvivalArea(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ExitLastWindowClosingSurvivalArea(); } \
  124.   NS_IMETHOD Quit(PRUint32 aMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->Quit(aMode); } 
  125.  
  126. #if 0
  127. /* Use the code below as a template for the implementation class for this interface. */
  128.  
  129. /* Header file */
  130. class nsAppStartup : public nsIAppStartup
  131. {
  132. public:
  133.   NS_DECL_ISUPPORTS
  134.   NS_DECL_NSIAPPSTARTUP
  135.  
  136.   nsAppStartup();
  137.  
  138. private:
  139.   ~nsAppStartup();
  140.  
  141. protected:
  142.   /* additional members */
  143. };
  144.  
  145. /* Implementation file */
  146. NS_IMPL_ISUPPORTS1(nsAppStartup, nsIAppStartup)
  147.  
  148. nsAppStartup::nsAppStartup()
  149. {
  150.   /* member initializers and constructor code */
  151. }
  152.  
  153. nsAppStartup::~nsAppStartup()
  154. {
  155.   /* destructor code */
  156. }
  157.  
  158. /* void createHiddenWindow (); */
  159. NS_IMETHODIMP nsAppStartup::CreateHiddenWindow()
  160. {
  161.     return NS_ERROR_NOT_IMPLEMENTED;
  162. }
  163.  
  164. /* void run (); */
  165. NS_IMETHODIMP nsAppStartup::Run()
  166. {
  167.     return NS_ERROR_NOT_IMPLEMENTED;
  168. }
  169.  
  170. /* void enterLastWindowClosingSurvivalArea (); */
  171. NS_IMETHODIMP nsAppStartup::EnterLastWindowClosingSurvivalArea()
  172. {
  173.     return NS_ERROR_NOT_IMPLEMENTED;
  174. }
  175.  
  176. /* void exitLastWindowClosingSurvivalArea (); */
  177. NS_IMETHODIMP nsAppStartup::ExitLastWindowClosingSurvivalArea()
  178. {
  179.     return NS_ERROR_NOT_IMPLEMENTED;
  180. }
  181.  
  182. /* void quit (in PRUint32 aMode); */
  183. NS_IMETHODIMP nsAppStartup::Quit(PRUint32 aMode)
  184. {
  185.     return NS_ERROR_NOT_IMPLEMENTED;
  186. }
  187.  
  188. /* End of implementation class template. */
  189. #endif
  190.  
  191. /**
  192.  * This success code may be returned by nsIAppStartup::Run to indicate that the
  193.  * application should be restarted.  This condition corresponds to the case in
  194.  * which nsIAppStartup::Quit was called with the eRestart flag.
  195.  */
  196. #define NS_SUCCESS_RESTART_APP \
  197.     NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_GENERAL, 1)
  198.  
  199. #endif /* __gen_nsIAppStartup_h__ */
  200.